<div align="center" class="information"></div>
<table class="titrepage" width="1000px">
    <tr>              
        <td width="300px">La liste des News</td>
        <td><a class="titrea" href="<?php echo site_url('avis_admin/list_categories')?>">La liste des Categories</a></td>
        <td><a class="titrea" href="<?php echo site_url('avis_admin/post_news')?>">Post news</a></td>
        <td align="right">Total | <?php echo $this->db->count_all('news');?></td>
    </tr>
</table>
<br/>
<table class="list"   width="100%">
    <thead>
        <tr>
            <th width="110px">Img</th>
            <th>Titre</th>
            <th>Catégorie</th>
            <th width="100px">Modification</th>
            <th width="100px">Suppression</th>    
        </tr>
        <?php foreach ($query as $aRow):?>
        <tr>
            <td><img src="<?php echo base_url().'/assets/thumbs/'.$aRow['image']; ?>" width="160" height="90" alt="" ></td>
            <td><?php echo $aRow['title'];?></td>
            <td><?php echo $aRow['name'];?></td>
            <td><a href="<?php echo site_url('avis_admin/update_news').'/'.$aRow['id'];?>">Edit</a></td>
            <td><a href="<?php echo site_url('avis_admin/delete_news').'/'.$aRow['id'].'/'.$per_page.'/'.$off_set;?>" onclick="return confirm('Etes-vous sûr?')">Delete</a></td>
        </tr>    
        <?php endforeach;?>
        <tr>
            <td colspan="6"><?php echo $pagination?></td>
        </tr>
    </thead> 
    <tbody>
    </tbody>
</table>
